package com.harmonyos.cases;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TestR {
    public static void main(String[] args) {
        String s="const config: PluginConfig = {\n" +
                "    // 扫描文件的路径\n" +
                "    scanFiles: [\"src/main/ets/pages/MainPage\"]\n" +
                "}";
        String regex = "[\\[\"[a-zA-Z0-9/\\\\-_]\"\\]]";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(s);
        if (matcher.find()) {
            int t=matcher.groupCount();
            for (int i = 0; i < t; i++) {
                System.out.println(matcher.group(i));
            }
        }
    }
}
